home *** CD-ROM | disk | FTP | other *** search
/ The Arsenal Files 8 / The Arsenal Files Collection #8 (Arsenal Computer) (1996).ISO / prg_casm / snpd9611.zip / STYLE.C < prev    next >
Text File  |  1996-11-24  |  1KB  |  24 lines

  1. .I 0 2
  2. /* +++Date last modified: 04-Aug-1996 */
  3.  
  4. .I 18 10
  5.       /* First of all, block comments (like this one) are preferable to    */
  6.       /* trailing (in-line) comments as in the following examples.         */
  7.  
  8.       int local1, local2;               /* local variable declarations are
  9.                                            always followed by a blank line */
  10.  
  11.       do_stuff();
  12.       if (bar(local1))
  13.       {     /* long comments here     *//* this lines up with -----------+ */
  14.             char *local3;               /* autos declared close to use   | */
  15. .D 19 7
  16. .I 26 6
  17.             do_more_stuff();            /* (everything else indented)    | */
  18.             local2 = strlen(local3);    /*                               | */
  19.       }                                 /* this <------------------------+ */
  20.       else  local2 = fubar();           /* using tab >= 6, else's line up  */
  21.       return local2;
  22. }                                       /* no question where functions end!*/
  23. .D 27 6
  24.